package com.jwgf.smarowindingmachine_unity.ui;

import com.jwgf.smarowindingmachine_unity.R;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.DatePicker;

public class StatisticsDatePickerDialog extends DialogFragment{

	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		LayoutInflater inflater = getActivity().getLayoutInflater();
		View v = inflater.inflate(R.layout.dialog_data_pick, null);
		DatePicker datePicker = (DatePicker)v.findViewById(R.id.date_picker);
		
		Bundle bd = getArguments();
		String title = bd.getString("title");
		long date = bd.getLong("date");
		
//		datePicker.init(year, monthOfYear, dayOfMonth, new OnDateChangedListener() {
//			
//			@Override
//			public void onDateChanged(DatePicker view, int year, int monthOfYear, int dayOfMnth) {
//
//			}
//		});
		
		AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
		builder.setTitle(title);
		builder.setView(v);
		return builder.create();
	}

	@Override
	public void onResume() {
		super.onResume();
		getDialog().getWindow().setLayout(600, 200);
	}

}
